#![allow(static_mut_refs)]
#![allow(warnings)] // 禁用所有警告

use crate::db::{db_insert::db_insert, db_select::db_select};
use crate::web_api::axum_manager::axum_init;
use runtime::GLOBAL_RUNTIME;
use crate::controller::controller_event;
use api::get_jwt::jwt_init;
use rustls::crypto::ring;

mod api;
mod db;
mod web_api;
mod get_path;
mod web_rtc;
mod media;
mod controller;
mod runtime;


fn main() {
    // 强制使用rustls的ring特性
    ring::default_provider().install_default().unwrap();
    GLOBAL_RUNTIME.spawn(async {
        jwt_init().await;
        axum_init().await;
        println!("Axum 服务已启动");
    });
    controller_event::handle_controller_event();
}